home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 8: LINUX Games / Linux Cubed Series 8 - LINUX Games.iso / games / muds / lpmud312.tar / lpmud312 / Makefile < prev    next >
Makefile  |  1993-01-11  |  5KB  |  199 lines

  1. # This line is needed on some machines.
  2.  
  3. MAKE=make
  4.  
  5. # Chose one of these mallocs:
  6.  
  7. MALLOC=smalloc
  8.  
  9. # Gnu malloc, fastest but uses most memory.
  10. #MALLOC=gmalloc
  11. #
  12. # Use the standard malloc on your system:
  13. #MALLOC=sysmalloc
  14. #
  15. # Lars special malloc for LPmud. Uses least memory, but has an inefficient
  16. # recombination scheme that may slow down the game after long uptimes.
  17. #MALLOC=malloc
  18. #
  19. # A malloc that will even reclaim memory that has been lost. Can be used to
  20. # searching for lost memory.
  21. #MALLOC=gc
  22.  
  23. # Set MUD_LIB to the directory which contains the mud data. Was formerly
  24. # defined in config.h !
  25.  
  26. MUD_LIB = /home/amir/lpmud/lib
  27.  
  28. # Set BINDIR to the directory where you want to install the executables.
  29.  
  30. BINDIR = /home/amir/lpmud/bin
  31.  
  32. # Define what random number generator to use.
  33. # If no one is specified, a guaranteed bad one will be used.
  34.  
  35. RAND=RANDOM
  36. YFLAGS=-d
  37.  
  38. #
  39. # If you don't have 'strchr', then add next flag to CFLAGS.
  40. # -Dstrchr=index -Dstrrchr=rindex
  41. #
  42.  
  43. PROFIL=
  44.  
  45. #Enable warnings from the compiler, if wanted.
  46.  
  47. WARN= -Wall -Wshadow -Dlint
  48.  
  49. # Enable run time debugging. It will use more time and space.
  50. # When the flag is changed, be sure to recompile everything.
  51. # Simply comment out this line if not wanted.
  52. # If you change anything in the source, you are strongly encouraged to have
  53. # DEBUG defined.
  54. # If you will not change anything, you are still strongly to have it defined,
  55. # as long as the game is not bug free.
  56.  
  57. DEBUG=-DDEBUG
  58. MPATH=-DMUD_LIB='"$(MUD_LIB)"'
  59.  
  60. # If you have a NeXT, add this to CFLAGS:
  61. # -DNeXT -bsd
  62. # If you have Linux 386/486 99p1 or newer, add this to CFLAGS:
  63. # -Dlinux
  64.  
  65. CFLAGS= -g -D$(RAND) -DMALLOC_$(MALLOC) $(WARN) -Dlinux -DTRACE_CODE $(PROFIL) $(DEBUG) $(MPATH) -DBINDIR='"$(BINDIR)"'
  66. CC=gcc
  67.  
  68. # Add extra libraries here.
  69.  
  70. LIBS= -lm # util/gc/gc.a
  71. MFLAGS = "BINDIR=$(BINDIR)" "MUD_LIB=$(MUD_LIB)"
  72.  
  73. # Add str.c here if you don't have memcpy() or strtol()
  74.  
  75. SRC=lex.c main.c interpret.c simulate.c object.c backend.c array.c\
  76.     comm1.c ed.c regexp.c wiz_list.c swap.c $(MALLOC).c\
  77.     call_out.c otable.c dumpstat.c stralloc.c hash.c indentp.c port.c\
  78.     access_check.c clilib.c parse_old.c parse.c prelang.y postlang.y \
  79.     simul_efun.c
  80.  
  81. # Add str.o here if you don't have memcpy() or strtol().
  82. # Add alloca.o if you don't have alloca() on your machine.
  83.  
  84. OBJ=lang.o lex.o main.o interpret.o simulate.o object.o backend.o array.o\
  85.     comm1.o ed.o regexp.o wiz_list.o swap.o $(MALLOC).o\
  86.     call_out.o otable.o dumpstat.o stralloc.o hash.o indentp.o port.o\
  87.     access_check.o clilib.o parse_old.o parse.o simul_efun.o
  88.  
  89. driver: $(OBJ)
  90.     -mv driver driver.old
  91.     $(CC) $(CFLAGS) $(OBJ) -o driver $(LIBS)
  92.  
  93. list_funcs:
  94.     @$(CC) -E $(CFLAGS) func_spec.c
  95.  
  96. make_func.c: make_func.y
  97.     yacc make_func.y
  98.     mv y.tab.c make_func.c
  99.  
  100. make_func: make_func.o
  101.     $(CC) make_func.o -o make_func
  102.  
  103. make_func.o: config.h
  104.  
  105. install: driver
  106.     install -c $? $(BINDIR)/parse
  107.  
  108. install.utils:
  109.     (cd util; $(MAKE) $(MFLAGS) install)
  110.  
  111. utils:    
  112.     (cd util; $(MAKE) $(MFLAGS))
  113.  
  114. parse: driver
  115.     -mv parse parse.old
  116.     cp driver parse
  117.  
  118. lint: *.c
  119.     lint *.c
  120.  
  121. call_out.o: object.h interpret.h
  122.  
  123. swap.o: swap.c object.h config.h interpret.h exec.h
  124.  
  125. lang.o: lang.c config.h object.h interpret.h exec.h instrs.h switch.h
  126.  
  127. lang.c lang.h: lang.y
  128.     yacc -d lang.y
  129.     mv y.tab.c lang.c
  130.     mv y.tab.h lang.h
  131.  
  132. lexical.o: lexical.c config.h
  133.  
  134. lexical.c: lexical.l
  135.  
  136. interpret.o: interpret.h config.h object.h instrs.h exec.h patchlevel.h\
  137.     switch.h lang.h
  138.  
  139. simulate.o: interpret.h object.h config.h sent.h wiz_list.h exec.h lang.h
  140.  
  141. wiz_list.o: wiz_list.h interpret.h
  142.  
  143. main.o: config.h object.h interpret.h lex.h
  144.  
  145. clean:
  146.     -rm -f *.o lang.h lang.c lexical.c mon.out *.ln tags
  147.     -rm -f parse core frontend mudlib/core mudlib/debug.log TAGS frontend.c
  148.     -rm -f config.status lpmud.log
  149.     (cd util ; echo "Cleaning in util." ; $(MAKE) clean)
  150.  
  151. frontend: comm2.o frontend.o
  152.     $(CC) $(CFLAGS) comm2.o frontend.o -o frontend $(LIBS)
  153.  
  154. tags: $(SRC)
  155.     ctags $(SRC)
  156.  
  157. TAGS: $(SRC)
  158.     etags $(SRC)
  159.  
  160. count_active: count_active.o
  161.     $(CC) count_active.o -o count_active
  162.  
  163. object.o: interpret.h object.h sent.h config.h wiz_list.h exec.h
  164.  
  165. backend.o: object.h config.h interpret.h wiz_list.h exec.h
  166.  
  167. comm1.o: comm.h sent.h interpret.h object.h config.h mudwho.h patchlevel.h
  168.  
  169. clilib.o: config.h
  170.  
  171. comm2.o: config.h comm.h
  172.  
  173. frontend.o: frontend.c config.h comm.h
  174.  
  175. ed.o: regexp.h object.h config.h interpret.h exec.h
  176.  
  177. regexp.o: regexp.h
  178.  
  179. otable.o: config.h object.h interpret.h
  180.  
  181. dumpstat.o: object.h interpret.h exec.h
  182.  
  183. parse_old.o: interpret.h config.h object.h wiz_list.h
  184.  
  185. parse.o: interpret.h config.h object.h wiz_list.h
  186.  
  187. stralloc.o: config.h
  188.  
  189. lex.o: config.h instrs.h interpret.h exec.h efun_defs.c lang.h lex.h
  190.  
  191. array.o: interpret.h object.h config.h wiz_list.h regexp.h exec.h
  192.  
  193. access_check.o: config.h
  194.  
  195. lang.y efun_defs.c: func_spec.c make_func prelang.y postlang.y config.h
  196.     ./make_func > efun_defs.c
  197.  
  198. simul_efun.o: interpret.h object.h exec.h
  199.